#include <algorithm>
#include <bits/stdc++.h>
#include <cmath>
#include <functional>
#include <queue>
#include <stdio.h>
#include <unordered_map>
#include <unordered_set>
#include <vector>

#ifndef TEST
#pragma GCC optimize("O3", "unroll-loops")
#pragma GCC target("avx2,bmi,bmi2,popcnt,lzcnt")
#endif
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<pii, int> piii;

// fast input
inline ll read() {
    ll X = 0, w = 0;
    char ch = 0;
    while (!isdigit(ch)) {
        w |= ch == '-';
        ch = getchar();
    }
    while (isdigit(ch))
        X = (X << 3) + (X << 1) + (ch ^ 48), ch = getchar();
    return w ? -X : X;
}

// fast output
inline void write(ll x) {
    if (x < 0)
        putchar('-'), x = -x;
    if (x > 9)
        write(x / 10);
    putchar(x % 10 + '0');
}

#define pb push_back
#define mp make_pair

void solve() {
    int n = read();
    vector<int> h(n);
    for (auto &x : h)
        x = read();
    ll M = read();
    int pw = 0;
    while ((1 << pw) <= n)
        pw++;
    pw--;
    vector<vector<int>> st(n, vector<int>(pw + 1, 0));
    for (int i = 0; i < n; i++) {
        st[i][0] = h[i];
    }
    for (int p = 1; p <= pw; p++) {
        for (int i = 0; i < n; i++) {
            if (i + (1 << p) <= n)
                st[i][p] = max(st[i][p - 1], st[i + (1 << (p - 1))][p - 1]);
        }
    }
    auto query = [&st](int l, int r) {
        int tpw = 0;
        int n = r - l + 1;
        while ((1 << tpw) <= n)
            tpw++;
        tpw--;
        return max(st[l][tpw], st[r - (1 << tpw) + 1][tpw]);
    };
    ll ans = 0;
    for (int i = 0; i < n; i++) {
        int l = i, r = n - 1;
        int tmp = i - 1;
        while (l <= r) {
            int m = (l + r) / 2;
            if ((ll) query(i, m) * (m - i + 1) <= M) {
                tmp = m;
                l = m + 1;
            } else {
                r = m - 1;
            }
        }
        ans += tmp - i + 1;
    }
    write(ans);
    putchar('\n');
}


int32_t main() {
    int t = 1;
    while (t--) {
        solve();
    }
}